package book_management.operation.impl;

import book_management.book.Book;
import book_management.book.BookList;
import book_management.operation.IOperation;
import javafx.beans.binding.ListExpression;

import java.util.Iterator;

public class BorrowOperation implements IOperation{
    @Override
    public void work(BookList bookList) {
        System.out.println("您现在进行的是书籍的借阅操作");
        System.out.println("请输入书籍名称:");
        String name = scanner.next();

        if (bookList.isContains(name)) {
            bookList.borrowBook(name);
            System.out.println("借阅成功~");
            return;
        }
        System.out.println("没有找到这本书!");
    }
}

